'use strict';

/**
 * @param {Egg.Application} app - egg application
 */
module.exports = app => {
  const { router, controller } = app;
  // router.get('/',app.middleware.checktoken(), controller.home.index);
  // router.get('/login',app.middleware.checktoken(), controller.home.login);
  // router.post('/login',app.middleware.checktoken(), controller.home.doLogin);
  // router.post('/logout',app.middleware.checktoken(), controller.home.logout);
  // router.get("/jwt",app.middleware.checktoken(), controller.jwt.index)
  router.post("/jwtlogin",controller.jwt.doLogin);
  router.get("/jwtmessage",app.middleware.checktoken(),controller.jwt.getMessage);
  router.resources("jwtmessage","/students",controller.students)
  router.delete("/students/:id",controller.students.destory)
};
